// vue
import Vue from 'vue'
// element-ui
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css'

// a useful empty vue-components
import Fragment from 'vue-fragment'
// some extended vue-components
import widget from './widget'
import './style/widget.css'

// font-awesome
import 'font-awesome/css/font-awesome.css'
import '@/lang/browser-patch'

// date format
import moment from "moment"

// main css setting
import './style/base.css'
import './style/product.css'

// app
import App from './App'
// router
import router from './router'

// initialize setting
import initialize from './starter/initialize'

// 兼容 Chrome 事件捕获机制：Passive Event Listeners；
import 'default-passive-events'

Vue.prototype.$moment = moment;

Vue.prototype.$layers = initialize.Layers;
Vue.prototype.$bamboo = initialize.Bamboo;
Vue.prototype.$eventbus = initialize.Eventbus;

Vue.prototype.$api = initialize.BAPI;
Vue.prototype.$application = initialize.application;

// 禁用生产环境信息提示
Vue.config.productionTip = false;
// 允许使用 fragment
Vue.use(Fragment.Plugin);
// 使用 element-ui 全家桶
Vue.use(ElementUI, {size: 'small', zIndex: 3000});
// 自定义组件库
Vue.use(widget);

new Vue({
  el: '#app',
  router,
  components: {App},
  template: '<App/>'
});
